home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / emulatrs / zxupload.arc / README.TXT < prev    next >
Encoding:
Text File  |  1992-05-31  |  6.0 KB  |  127 lines

  1. Overview
  2. ========
  3. This wondrous suite of programs will allow you to transfer programs from the
  4. ZX Spectrum to the ST (for use with the Spectrum emulator) via MIDI, if you
  5. have the Ram Music Machine for the Spectrum, and a MIDI cable.  If you have
  6. a different interface, you will need to alter the Spectrum program supplied.
  7. The ST program should work on any flavour of TOS.
  8.  
  9. Instructions
  10. ============
  11. 1. List Z80.TXT (or better still, print it out) and type the listing into
  12.    the Spectrum.  Your ZX Printer should not be connected or Bad Things will
  13.    happen.  Run it, and be ready to save the resulting program.
  14.  
  15. 2. If the code has saved correctly, switch off both machines and plug in the
  16.    Music Machine interface.  Connect MIDI OUT on the Music Machine to MIDI
  17.    IN on the ST with the cable.  Switch your Spectrum on again, and the ST.
  18.  
  19. 3. Enter LOAD "midixfer" CODE on the Spectrum, and load the program.  (When
  20.    I type blind I use LOAD "midixfer" CODE: BEEP .5,12 so I know it's OK.)
  21.  
  22. 4. Double-click on MIDIXFER.TOS on the ST.  The floppy disk should be write-
  23.    enabled!  Watch the nice colours (not sure what happens in mono though).
  24.  
  25. 5. On the Spectrum, enter RANDOMIZE USR 23296.  This invokes a short machine
  26.    code program which loads the first thing it finds on tape and shoves the
  27.    whole lot down the MIDI cable, suitably modified to load into the
  28.    emulator without any editing.  Whether the program will run or not...
  29.  
  30. 6. When the ST screen starts to flash in different colours, this means the
  31.    MIDI transfer is taking place.  You should stop the tape now, especially
  32.    if you are transferring a multi-part program.  The flashing will go on
  33.    for 10 seconds at most, and then the file will be written to disk.
  34.  
  35. 7. If you have more stuff to transfer, return to step 4.  If not, you might
  36.    as well switch off the Spectrum (see Troubleshooting Q&A).  Start up the
  37.    emulator, put in your disk with the new progs on it and enter LOAD "".
  38.    Then press the function key for Rescan so it can find the new progs and
  39.    write a contents file (INHALT.INF).
  40.  
  41. Troubleshooting Q&A
  42. ===================
  43. Q. When I switch on my ST the desktop comes up but I can't do anything.
  44.  
  45. A. MIDI data was probably being sent to the ST when it was switched on.
  46.    Unplug the cable and reboot.
  47.  
  48. Q. I could have sworn I transferred two programs but I can only find one.
  49.  
  50. A. They must both have had the same name.  You'll need to rename the one you
  51.    have (which will be the second one) and re-transfer the first.  Which
  52.    leads us on to..
  53.  
  54. Q. I renamed a program on disk but it wouldn't load into the emulator.
  55.  
  56. A. You'll have to take a disk editor to it.  The name within the file (byte
  57.    0 is file-type, bytes 1-11 are name (padded with spaces)) must correspond
  58.    to the name of the file on disk.
  59.  
  60. Q. I can't transfer this hyperload/full-length/headerless etc. program.
  61.  
  62. A. You can only transfer "normal" programs less than 41K.  Anything more
  63.    complex than a few LOAD "" CODEs will probably need to be hacked.
  64.  
  65. Q. The tape has played through to the end but nothing happened on the ST/
  66.    the transfer started too early/the program won't load into the emulator.
  67.  
  68. A. There was either a tape loading error, or the program is protected.
  69.  
  70. How It Works
  71. ============
  72. The Spectrum program loads the first thing it finds, header then data.  It
  73. uses the file length specified in the header to work out how much data to
  74. load, and also how much to send (plus 17 bytes for the header) via MIDI.
  75. When the file has been loaded, two bytes are sent giving the file length,
  76. then the whole file is transferred.
  77.  
  78. The ST program waits for bytes to arrive via the MIDI port.  The first two
  79. represent the length of the following file.  That amount of bytes are then
  80. read from the port and written to disk, using the name contained in the
  81. header.  Anything too long or illegal is usually dealt with sensibly by TOS.
  82. The file format required by the emulator is simply the original file header
  83. plus data.
  84.  
  85. The RAM Music Machine conveniently uses the same ACIA (6850) as the ST.
  86. All the source code is in the archive, although modifications should only
  87. be necessary for those with a different interface.  Even if the ACIA is the
  88. same (which is very probable), the I/O ports used might be different.
  89. Transmission speed with my setup seems to be about 38Kbaud and I have yet to
  90. see a single transmission error (not having tried anything stupid like
  91. injecting maple syrup into the MIDI ports beforehand).
  92.  
  93. The Emulator In General
  94. =======================
  95. The documentation claims full implementation of Interrupt Mode 2.  This is a
  96. teensy fib, because in that case even the most complex programs should run.
  97. They don't - Turbo Esprit and Match Day both freeze mysteriously.  In the
  98. latter case, I went through the code disabling stuff left, right and centre,
  99. but only got as far as having the teams running (er, strolling) out.
  100.  
  101. The R register isn't implemented properly.  Many games use this as a
  102. primitive kind of random number generator - like Glass and Jetpac.  I had to
  103. write my own for the latter game (couldn't be bothered with Glass though).
  104.  
  105. Binary Coded Decimal has been kludged somewhat.  The DAA instruction always
  106. rounds up, instead of taking the Add/Subtract flag into account.  This meant
  107. the on-screen timer in Arcadia counted down to 90 and then back to 96!
  108.  
  109. The only keyboard ports read are those mentioned in the orange manual. Manic
  110. Miner and Jetset Willy both use undocumented ports.
  111.  
  112. Finally, I found that if you hack games and remove all their sound routines,
  113. you can speed them up quite dramatically.  I had Manic Miner running at about
  114. 90% of the speed of the original (this on a plain 1Mb STE) and Horace Goes
  115. Skiing actually running faster.
  116.  
  117.  
  118. All the code is PD, but before you get bored with the emulator, I'd quite
  119. like to receive your (complimentary) comments on a postcard - even if you
  120. have no comments to make, I'd still like a postcard! - sent to:
  121.  
  122. Stephen K Mulrine
  123. 132 Kingswood Drive
  124. King's Park
  125. Glasgow G44 4RB
  126. SCOTLAND
  127.